package com.self.finance.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
    * 数字货币充值记录
    */
@ApiModel(value="com-self-finance-model-CoinRecharge")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "coin_recharge")
public class CoinRecharge implements Serializable {
    /**
     * 自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="自增id")
    private Long id;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value="用户id")
    @NotNull
    private Long userId;

    /**
     * 币种id
     */
    @TableField(value = "coin_id")
    @ApiModelProperty(value="币种id")
    @NotNull
    private Long coinId;

    /**
     * 币种名称
     */
    @TableField(value = "coin_name")
    @ApiModelProperty(value="币种名称")
    private String coinName;

    /**
     * 币种类型
     */
    @TableField(value = "coin_type")
    @ApiModelProperty(value="币种类型")
    private String coinType;

    /**
     * 钱包地址
     */
    @TableField(value = "address")
    @ApiModelProperty(value="钱包地址")
    private String address;

    /**
     * 充值确认数
     */
    @TableField(value = "confirm")
    @ApiModelProperty(value="充值确认数")
    private Integer confirm;

    /**
     * 状态：0-待入帐；1-充值失败，2到账失败，3到账成功；
     */
    @TableField(value = "status")
    @ApiModelProperty(value="状态：0-待入帐；1-充值失败，2到账失败，3到账成功；")
    private Integer status;

    /**
     * 交易id
     */
    @TableField(value = "txid")
    @ApiModelProperty(value="交易id")
    private String txid;

    @TableField(value = "amount")
    @ApiModelProperty(value="")
    @NotNull
    private BigDecimal amount;

    /**
     * 修改时间
     */
    @TableField(value = "last_update_time",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value="修改时间")
    private Date lastUpdateTime;

    /**
     * 创建时间
     */
    @TableField(value = "created",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    private Date created;

    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String realName;
}